//
// @file
// Styles for Sooper Configurator and skinr
//
// @todo test this styling in popular admin themes
//

@import "compass/css3";
@import "base";

$default-text-shadow-color: #fff;
$default-text-shadow-h-offset: 1px;
$default-text-shadow-v-offset: 1px;
$default-text-shadow-blur: 1px;
$default-transition-duration: 500ms;

@mixin magic-border($offset: 1) {
  @include box-shadow(rgba(#fff, $offset) 0 0 0 1px inset);
}

.block-system .contextual-links-wrapper {
  display:none!important;
}

.page-admin-appearance-settings .main form {
  position:relative;
  z-index:5;
}

.region-sidebar-second,
.region-sidebar-first,
/*.secondary,*/
#block-system-help {
  display:none;
}

.wrap-columns .main {
  margin-left:0;
  margin-right:0;
  width:100%;
}

#system-theme-settings {

  a {
    color:#0074BD;
  }

  // First we repeat stylistic parts of the AAVB forms.scss to undo the theme specific overrides

  label {
    line-height: 1.4em;
    display:block;
    font-weight:bold;
  }

  // Set font for forms
  label,
  input,
  select,
  textarea {
    font-family:inherit;
    color:inherit;
    max-width:99%;
  }

  // Inputs, Textareas, Selects
  input,
  textarea,
  select {
    padding: 4px;
    line-height: 1.4em;
    border: 1px solid #ccc;
    background:#fff;
  }

  input[type=checkbox],
  input[type=radio] {
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 0;
    margin: -2px 0 0 0;
    border:none;
  }

  input,
  textarea {
    $transition: border linear .2s, background-color linear .2s;
    @include transition($transition);
    @include box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
    @include border-radius(3px);
    background-color:#fff;
  }

  input:focus,
  textarea:focus {
    outline: 0;
    border-color: #bbb;
    background-color:#fafafa;
  }

  input[type=button],
  input[type=reset],
  input[type=submit],
  button,
  input.form-submit,
  .form-actions a,
  .form-actions a:visited {
    width: auto;
    height: auto;
    margin:1.4em 6px 0 0;
    padding:8px 12px 8px 12px;
    cursor:pointer;
    background-color:#fff;
    @include background-image(linear-gradient(#fff, #e4e4e4));
    @include magic-border(0.75);
    background-repeat:no-repeat;
    border-color:#ccc;
    @include border-radius(4px);
    $transition: border linear .4s, background-position linear .4s;
    line-height:1em; // is not a cross-browser reliable function here
    word-wrap:normal;
    overflow: visible; // needed to make ie7 respect padding and border size
    &:hover, &:focus {
      background-position:0 10px;
      border-color:#dadada;
    }
  }

  // Help Text
  .description {
    font-size: 11px;
    line-height: 1.4em;
  }
  // Error

  form .error {
    border:1px solid #cc0000;
  }

  // Remove and list styling from themes

  ul li {
    margin:0;
    padding:0;
    background:none;
  }

  // Start form specific styling for Configurator

  border:1px solid #bbb;
  color:#333;
  width:942px;
  padding:0;
  margin:2em 0 0 0;
  background:#fff;
  font-size:13px;
  @include border-radius(5px);
  overflow:hidden;
  //@include box-shadow(#aaa 2px 2px 0);
  font-family:Arial,verdana,sans;
  line-height:1.3em;
  h1,h2,h3,h4 {
    font-family:Arial,verdana,sans;
    color:#333;
    margin:0;
    padding:0 0 5px 0;
    line-height:1em;
    font-weight:bold;
  }
  h2 {
    font-size:27px;
  }
  h3 {
    font-size:14px;
  }
  legend, legend span {
    font-weight:bold;
  }
  .configurator-header {
    padding:20px;
    overflow:hidden;
    background-color: #f1f1f1;
    position:relative;
    //@include background-image(linear-gradient(#ddd, #fcfcfc));
    @include border-radius(5px 5px 0 0);
    @include magic-border(0.5);
    @include single-text-shadow;
    .configurator-logo {
      position:absolute;
      top:-30px;
      right:-30px;
      opacity:0.6;
      width:25px;
      margin:50px;
      border:none;
      outline:none;
      background:none;
      @include opacity(0.3);
      @include single-transition(all);
      &:hover, &:focus {
        opacity:1;
        width:125px;
        @include opacity(1);
      }
    }
  }
  .vertical-tabs-pane {
    width:661px;
    background:#fff;
    fieldset {
      margin:0 0 20px 0;
    }
  }
}


#page .main {
  width:100%;
  margin-left:0;
  margin-right:0;
}

fieldset {
  background:#fff;
  border: 1px solid #ccc;
  padding: 2.5em 0 0 0;
  position: relative;
  margin: 20px 0;
}

fieldset .fieldset-wrapper {
  padding: 0;
}
fieldset.collapsed {
  background-color: transparent;
}
html.js fieldset.collapsed {
  border-width: 1px;
  height: auto;
}
fieldset fieldset {
  background-color: #fff;
}
fieldset fieldset fieldset {
  background-color: #f8f8f8;
}

.page-admin-appearance-settings #edit-actions {
  padding:20px;
  background-color:#f1f1f1;
  //@include background-image(linear-gradient(#fcfcfc, #ddd));
  @include border-radius(0 0 5px 5px);
  @include magic-border(0.5);
  @include clearfix;
}

/**
 * .main form elements.
 */
.main form .form-item {
  padding: 0;
  margin: 0 0 14px;
  float:left;
  clear:both;
  position:relative;
  div {
    float:none;
    margin:0;
    padding:0;
    background:none;
  }
}
.main .form-actions div {
  float:none;
  margin:0;
  padding:0;
  background:none;
  display:inline;
}

.filter-wrapper .form-item,
div.teaser-checkbox .form-item,
.form-item .form-item {
  padding: 5px 0;
  margin: 0;
  border: 0;
}
.text-format-wrapper .form-item {
  padding-bottom: 0;
}
.form-item label {
  margin: 0;
  padding: 0;
  line-height:1.6em;
  em {
    font-weight:normal;
  }
}
.form-item label.option {
  text-transform: none;
}
.form-item label.option {
  font-size: 0.923em;
}
.form-item label.option input {
  vertical-align: middle;
}
.form-disabled input.form-autocomplete,
.form-disabled input.form-text,
.form-disabled input.form-file,
.form-disabled textarea.form-textarea,
.form-disabled select.form-select {
  background-color: #eee;
  color: #777;
}

/**
 * Vertical tabs
 */

div.vertical-tabs {
  width:100%;
  border-width:1px 0;
  margin:0;
}

div.vertical-tabs .form-item {
  width:100%;
}

div.vertical-tabs .vertical-tabs-panes .vertical-tabs-pane fieldset {
  border: 1px solid #ccc;
  padding:20px;
}

div.vertical-tabs .vertical-tabs-list {
  border:none;
}

div.vertical-tabs ul li.vertical-tab-button a {
  border-bottom:1px solid #D7D7D7;
  border-top:1px solid #fff;
  font-size:13px;
  text-shadow: 0 1px 0 #fff;
  text-decoration:none;
  padding:10px 10px 10px 20px;
  background:none;

}

div.vertical-tabs ul li.vertical-tab-button a strong {
  font-weight:normal;
}

div.vertical-tabs .vertical-tabs-panes .vertical-tabs-pane fieldset legend {
  display: inline-block;
}

div.vertical-tabs .form-item[class$="invoke"] .form-text {
  max-width:none;
}

fieldset fieldset {
  background-color: #f4f4f4;
  clear:both;
}

fieldset fieldset legend {
  padding-left: 10px;
  text-transform: capitalize;
  font-size:14px;
  display:block;
}

fieldset fieldset fieldset {
  background-color: #FFFFFF;
}

fieldset fieldset fieldset fieldset {
  background-color: #f1f1f1;
}

fieldset .fieldset-wrapper {
  padding:0;
}

/**
 * jQuery ui tabs
 */

#system-theme-settings .ui-tabs .ui-tabs-nav {
  border:solid #CCC;
  border-width:0 1px 0 0;
  margin:0;
  padding:0;
  @include border-radius(0);
  position:relative;
  bottom:-2px;
  background:#eee;
}

#system-theme-settings .ui-tabs .ui-tabs-nav li {
  width:20%;
  padding:0;
  margin:0;
  position:static;
  background:#f1f1f1;
  background-color:rgba(255,255,255,0.6);
  width:130px;
  border-top:1px solid #d7d7d7;
  border-left:1px solid #d7d7d7;
  border-right:1px solid #fff;
  border-bottom:1px solid #d7d7d7!important; /* jQuery ui css does this */
  @include border-radius(0);
}

#system-theme-settings .ui-tabs .ui-tabs-nav li.ui-tabs-selected {
  border-bottom-color:#fff!important; /* jQuery ui css does this */
  padding-bottom:0;
}

#system-theme-settings .ui-tabs .ui-tabs-nav li a {
  background:transparent url('../images/devices.png') no-repeat 50% 85%;
  display:block;
  width:100%;
  text-align:center;
  padding:0;
  margin:0;
  height:100px;
  line-height:18px;
  border-radius:0;
  font-size:10px;
  text-shadow: 0 1px 0 #fff;
  opacity:0.8;
}

#system-theme-settings .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
  background:#fff url('../images/devices.png') no-repeat 50% 85%;
  color:#0074BD;
  opacity:1;
}

/**
 * LayoutKit
 */

div.vertical-tabs .vertical-tabs-panes #edit-layout {
  margin-top:109px;
}

#edit-layout.ui-tabs .ui-tabs-nav li:nth-child(2) a {
  background-image:url('../images/devices2.png');
  background-position:50% 62%;
}
#edit-layout.ui-tabs .ui-tabs-nav li:nth-child(3) a {
  background-image:url('../images/devices3.png');
  background-position:50% 78%;
}
#edit-layout.ui-tabs .ui-tabs-nav li:nth-child(4) a {
  background-image:url('../images/devices4.png');
  background-position:50% 60%;
}
#edit-layout.ui-tabs .ui-tabs-nav li:nth-child(5) a {
  background-image:url('../images/devices5.png');
  background-position:50% 78%;
}

div.vertical-tabs .vertical-tabs-panes fieldset .form-item {
  clear:both;
}

#edit-layout .form-item-responsive-enable {
  position:absolute;
  top:-90px;
  width:630px;
  background:#f1f1f1;
  padding:16px!important;
  float:left;
  label {
    font-weight:normal;
    display:inline;
    width:auto;
  }

}

.page-admin-appearance-settings div.vertical-tabs .vertical-tabs-panes {
  margin: 20px 14px 20px 260px;
  padding:0;
}

div.vertical-tabs .vertical-tabs-panes #edit-layout fieldset {
  margin-top:0;
  padding-top:1.5em;
  border-top-width:0;
  font-size:13px;
}

div.vertical-tabs .vertical-tabs-panes fieldset label {
  width:100%;
  clear:both;
  display:block;
  font-weight:bold;
  font-size:13px;
}

div.vertical-tabs .vertical-tabs-panes fieldset .fieldset-description {
  margin-bottom:1em;
}

div.vertical-tabs .vertical-tabs-panes fieldset .description {
  float:right;
  width:444px;
  margin:0 0 0 10px;
  color:#999;
  font-size:13px;
}

div.vertical-tabs .vertical-tabs-panes fieldset fieldset .description {
  width:400px;
}

div.vertical-tabs .vertical-tabs-panes fieldset fieldset fieldset .description {
  width:357px;
}

#system-theme-settings div.vertical-tabs .vertical-tabs-panes .form-type-checkboxes .description {
  float:none;
  width:auto;
  clear:both;
  margin:0;
}

#system-theme-settings label.option {
  color:#999;
  font-size:13px;
  display:inline;
  width:auto;
}

div.vertical-tabs .vertical-tabs-panes fieldset .form-text,
div.vertical-tabs .vertical-tabs-panes fieldset select {
  float:left;
  width:200px;
  font-size:13px;
}

div.vertical-tabs .vertical-tabs-panes fieldset .form-type-textarea {
  width:100%;
  font-size:13px;
  clear:both;
}

div.vertical-tabs .vertical-tabs-panes fieldset .form-type-textarea .description,
div.vertical-tabs .vertical-tabs-panes fieldset .form-text-full ~ .description {
  margin:5px 0 0 0;
  width:100%;
}

div.vertical-tabs .vertical-tabs-panes fieldset .form-text-full {
  width:100%;
}

/**
 * Color Painter
 */

.farbtastic {
  z-index:10;
}

.color-form .form-item-scheme {
  height:3.2em;
}

#palette {
  margin-top:2em;
  .form-item {
    height:2.8em;
    padding:5px 0;
  }
  .item-selected {
    background:none;
    input {
      @include box-shadow(#0074BD 0 0 3px);
    }
  }
  .lock {
    left:-18px;
    top:-2em;
  }
}

.color-form {
  h2,
  #preview {
    visibility:hidden;
  }
}

/**
 * BackgroundKit
 */

#edit-backgroundkit.ui-tabs .ui-tabs-nav li {
  width:328px;
}

#system-theme-settings #edit-backgroundkit.ui-tabs .ui-tabs-nav li a {
  background-image:url("../images/devices-bgimg.png");
}
#system-theme-settings #edit-backgroundkit.ui-tabs .ui-tabs-nav li:first-child a {
  background-image:url("../images/devices-bggrad.png");
}

#edit-backgroundkit fieldset {
  margin-top:0;
  padding-top:1.5em;
  border-top-width:0;
  font-size:13px;
}

#edit-backgroundkit #farb-bgkit {
  position:absolute;
  top:8em;
  left:265px;
  z-index:10;
}

#edit-gradient-opacity,
#edit-image-opacity {
  margin-top:30px;
  opacity:0.5;
}

#edit-backgroundkit .ui-slider {
  top:65px;
  width:195px;
  padding-top:0;
}

#edit-gradient-color-bottom,
#edit-gradient-color-top {
  cursor:pointer;
  padding:3px;
}

#edit-gradient-color-bottom {
  margin-bottom:6em;
}

.demo-background-wrapper {
  width:50%;
  float:left;
  margin-bottom:20px;
}

.demo-background {
  margin-right:20px;
  height:100px;
}

/**
 * SlideshowKit
 */


#edit-slideshowkit.ui-tabs .ui-tabs-nav li {
  width:328px;
}

#system-theme-settings #edit-slideshowkit.ui-tabs .ui-tabs-nav li a {
  background-image:url("../images/devices-slcycle.png");
}
#system-theme-settings #edit-slideshowkit.ui-tabs .ui-tabs-nav li:first-child a {
  background-image:url("../images/devices-slflex.png");
}

#edit-slideshowkit fieldset {
  margin-top:0;
  padding-top:1.5em;
  border-top-width:0;
  font-size:13px;
}

.demo-background-wrapper p {
  margin:0;
}

/**
 * Pick a sidebar configuration
 */

#edit-layout .form-radios {
  @include clearfix;
}

#edit-layout .form-type-radio {
  float:left;
  clear:none;
  width:100px;
  height:80px;
}

#edit-layout .form-radios label {
  background:#fff url('../images/layouts.png') no-repeat 0 0;
  display:block;
  float:left;
  width:80px;
  height:80px;
  text-indent:-99999px;
  border:3px solid #fff;
  border-radius:3px;
  overflow:hidden;
  cursor:pointer;
}

#edit-layout label:hover,
#edit-layout label:focus {
  border-color:#9dc5de;
}

#edit-layout input[type="radio"]:checked+label {
  border-color:#88cb00;
}

#edit-layout label[for$="-2"] {
  background-position:-93px 0;
}

#edit-layout label[for$="-3"] {
  background-position:-186px 0;
}

#edit-layout label[for$="-4"] {
  background-position:-280px 0;
}

#edit-layout label[for$="-5"] {
  background-position:-370px 0;
}

#edit-layout .form-radios input {
  visibility:hidden;
}

/**
 * Fontkit
 */


.fontkit-previews p {
  margin:0 0 20px 0;
}

.font-preview {
  font-size:30px;
  padding:10px 0;
  border-top:2px solid #ccc;
}

.font-preview p {
  margin:10px 0;
}

.font-preview .font-test,
.font-preview .font-test-accents {
  font-size:16px;
}

.font-preview .font-test-small {
  font-size:13px;
}

#edit-font-choose .form-item {
  float:left;
  width:220px;
  clear:left;
  &.form-type-textfield {
    float:right;
    clear:right;
    width:398px;
  }
}

#edit-font-choose .form-text {
  width:100%
}
